package util;

import org.apache.cxf.service.invoker.SessionFactory;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	
	private static SessionFactory sf;
	
	static{
		Configuration cfg = new Configuration();
		cfg.configure();
		
		sf = (SessionFactory) cfg.buildSessionFactory();
	}
	
	public static Session getSession(){
		return ((org.hibernate.SessionFactory) sf).openSession();
		
	}

}
